//
//  RW_MineViewController.m
//  SleepApp
//
//  Created by MAC on 2021/3/22.
//  Copyright © 2021 RiceWang. All rights reserved.
//

#import "RW_MineViewController.h"
#import "RW_MineView.h"
#import "RW_MixedViewController.h"
#import "RW_SetupViewController.h"

@interface RW_MineViewController ()
@property (nonatomic,strong) RW_MineView *wlclass_view;
@property (nonatomic,strong) RW_MineViewModel *wlclass_view_model;
@end

@implementation RW_MineViewController

- (void)initView{
    [self.contentView addSubview:self.wlclass_view];
    [self.wlclass_view mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.insets(UIEdgeInsetsZero);
    }];
}
- (void)initData{
    self.wlclass_view.wlclass_view_model = self.wlclass_view_model;
}
/** 子控制每次展示页面刷新数据 */
-(void)initReloadData{
    [self.wlclass_view reloadUserInfo];
}

#pragma mark -- 父控制器功能
-(NSString *)set_title{
    return @"我的";
}
-(UIButton *)set_rightButton{
    UIButton *button = [[UIButton alloc]init];
    [button setImage:[UIImage svgName:@"mine_setup_icon"] forState:UIControlStateNormal];
    return button;
}
-(void)right_button_event:(UIButton *)sender{
    [RW_SetupViewController pushSetupFromVc:self];
}
#pragma mark -- 懒加载
-(RW_MineView *)wlclass_view{
    if (!_wlclass_view){
        _wlclass_view = [[RW_MineView alloc]init];
    }
    return _wlclass_view;
}
-(RW_MineViewModel *)wlclass_view_model{
    if (!_wlclass_view_model){
        _wlclass_view_model = [[RW_MineViewModel alloc]init];
    }
    return _wlclass_view_model;
}
@end
